package org.example.database_course_design.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.example.database_course_design.entity.PO.Cardinfo;
import org.example.database_course_design.entity.PO.Deposit;
import org.example.database_course_design.entity.PO.Tradeinfo;
import org.example.database_course_design.entity.PO.Userinfo;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface AdminService {
    Boolean removeById(String pid);

    Userinfo login(String username, String password);

    Userinfo update(Userinfo userinfo);

    Userinfo signup(Map<String, Object> map);

    Page<Userinfo> getCustomerList(Integer pageNum, Integer pageSize);

    void CustomerToCSV(String path) throws IOException;

    List<Cardinfo> addCard(String pass, String pid, BigDecimal openMoney);

    Page<Cardinfo> getCardList(Integer pageNum, Integer pageSize);

    Boolean updateCard(Cardinfo c);

    Boolean deleteCard(String cardID, String password);

    void CardToCSV(String path) throws IOException;

    Page<Tradeinfo> getTradeList(Integer nums, Integer size);

    Boolean deleteTrade(Integer tradeID);

    void TradeToCSV(String path) throws IOException;

    Deposit addDeposit(Deposit deposit);

    Page<Deposit> getDepositList(Integer nums, Integer size);

    Boolean updateDeposit(Deposit deposit);

    Boolean deleteDeposit(Long savingID);

    void DepositToCSV(String path) throws IOException;
}
